From: Keir Fraser Date: Sat, 26 Jan 2008 11:29:29 +0000 (+0000) Subject: x86: When Xen is notified that CPU frequency has changed, do not trust X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14392 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c22615b9ae644208997cccbf2f14dccfc2ecdfb3;p=xen.git x86: When Xen is notified that CPU frequency has changed, do not trust the current TSC-extrapolated time when we re-sync. Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index 3793c4bb2c..e079138b23 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -732,8 +732,10 @@ int cpu_frequency_change(u64 freq) local_irq_disable(); rdtscll(curr_tsc); t->local_tsc_stamp = curr_tsc; - t->stime_local_stamp = get_s_time(); t->stime_master_stamp = read_platform_stime(); + /* TSC-extrapolated time may be bogus after frequency change. */ + /*t->stime_local_stamp = get_s_time();*/ + t->stime_local_stamp = t->stime_master_stamp; set_time_scale(&t->tsc_scale, freq); local_irq_enable();